home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / mini / Token-Ring < prev    next >
Text File  |  1997-01-30  |  18KB  |  471 lines

  1.   Token-Ring mini-HOWTO
  2.   Mike Eckhoff, mike.e@emissary.aus-etc.com
  3.   Rev 4.1 1/7/98
  4.  
  5.   This howto is designed to help you install the kernel patch and also
  6.   try to point out some things to look for. I suggest that you at least
  7.   browse through all of this document before attempting to install any
  8.   part of the Token Ring driver for Linux.
  9.  
  10.      Special Thanks
  11.         to Mark Swanson, Peter De Schrijver, David Morris, Paul Norton
  12.         and everyone else I may have missed who put in their time to
  13.         write and maintain this driver.  Also to packrat for his support
  14.         of the linux-tr listserv.
  15.  
  16.   1.  Copyright and other Jazz
  17.  
  18.   We do not guarantee that this howto will be accurate for your system.
  19.   Most people who have used it have had very good results in installing
  20.   Linux on a Token Ring network.
  21.  
  22.   USE THIS HOWTO AT YOUR OWN RISK!!!  We are not responsible for any
  23.   problems caused by using this howto.
  24.  
  25.   If you have any problems with the driver that are not talked about in
  26.   this howto, feel free to email me at...
  27.  
  28.        mike.e@emissary.aus-etc.com
  29.  
  30.   You may also wish to join the Linux on Token Ring Listserv by mailing
  31.   majordomo@emissary.aus-etc.com with the body containing:
  32.  
  33.        subscribe linux-tr
  34.  
  35.   This document is copyright (c) 1995-1998 by Michael Eckhoff.  You may
  36.   make copies of this document in whole or in part, in any medium
  37.   physical or electronic, as long as the copyright notice is retained on
  38.   all copies.  Commercial redistribution is allowed and encouraged;
  39.   however, please notify me so that I can make sure that you have the
  40.   most current information available.
  41.  
  42.   2.  Hardware requirements
  43.  
  44.   Make sure that you have a Token Ring card that is supported by this
  45.   driver.  Currently the only cards that are supported are those that
  46.   use the Tropic chipset.
  47.  
  48.   Cards that I personally know to work are:
  49.  
  50.   ╖  3Com 3C619B Token Link
  51.  
  52.   ╖  3Com 3C619C Token Link
  53.  
  54.   ╖  HyperRing Classic 16/4
  55.  
  56.   ╖  IBM Turbo 16/4 ISA adapter**
  57.  
  58.   ╖  IBM Token Ring Auto 16/4 ISA adapter
  59.  
  60.   ╖  IBM Token Ring Auto 16/4 adapter /A
  61.  
  62.   ╖  IBM Token Ring 16/4 adapter /A
  63.  
  64.   ╖  IBM Token Ring adapter /A
  65.  
  66.   ╖  IBM Token Ring adapter II (4 Megabit only)
  67.  
  68.   ╖  IBM 16/4 ISA Token Ring card (16bit)
  69.  
  70.   ╖  IBM 16/4 ISA Token Ring card (8bit)
  71.  
  72.   ╖  Madge Blue (100% IBM compatable)
  73.  
  74.      All other 100% IBM compatable shared-ram adapters should also work
  75.      fine.  Please let us know if you find differently.
  76.  
  77.   It is recommended that you use 16KB Shared RAM for the time being.
  78.  
  79.   Cards that may cause problems:
  80.  
  81.      IBM Turbo 16/4 ISA adapter
  82.         This adapter will, in fact, work fine with the Linux token ring
  83.         driver.  However, you MUST run the card in Auto 16/4
  84.         compatability mode.  The simplest way to set this is to use the
  85.         LANAID disks sent with the card and run the command:
  86.  
  87.           LANAIDC /FAST=AUTO16
  88.  
  89.      You should then use LANAIDC or LANAID to configure the card accord¡
  90.      ing to documentation.
  91.  
  92.      Token-Ring Network 16/4 Adapter II
  93.         This adapter will NOT work.  Do not confuse this card with the
  94.         IBM Token Ring adapter II (4mbit) which does. It is a
  95.         DMA/Busmaster adapter for ISA.
  96.  
  97.      3Com TokenLink Velocity ISA
  98.         You may or may not get this one to work.  I have had reports of
  99.         people running it without problems, and others who get errors
  100.         left and right.
  101.  
  102.      PCI adapters
  103.         Currently, none of the IBM PCI adapters are supported.
  104.  
  105.      IBM Auto LanStreamer 16/4 Token-Ring PCI Adapter
  106.         Currently not supported, but being worked on.  This driver
  107.         should be Full Duplex as well when completed.
  108.  
  109.   3.  Software needed
  110.  
  111.      NOTE:
  112.         If you are running a 2.0 distribution of Linux, please jump to
  113.         the distriubtion specific section of this document.  The
  114.         following is mostly for 1.2 kernels.
  115.  
  116.   This assumes you already have Linux up and running.
  117.  
  118.   Obtain the Token Ring patch from:
  119.  
  120.        <ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-
  121.        Ring/TokenRing.patch-1.2.0.gz>
  122.  
  123.   Obtain the NetTools patched source from:
  124.  
  125.        <ftp://ftp.wayne.esu1.k12.ne.us/pub/Linux/Token-Ring/net-
  126.        tools-1.2.0.patched.tar.gz>
  127.  
  128.   Create a directory for the patches (such as /usr/src/patches) and
  129.   place the patches there.
  130.  
  131.        mkdir /usr/src/patches             central directory for patch storage
  132.        mkdir /usr/src/patches/token       place TokenRing patch here
  133.  
  134.   4.  Installation and setup
  135.  
  136.      NOTE:
  137.         These instructions are for patching a 1.2 kernel for token ring
  138.         support.  If you have a 2.0 kernel, you only need to recompile
  139.         the current source and say ``yes'' or ``module'' when asked for
  140.         token ring support.
  141.  
  142.   1. Install the Token Ring card into the system and configure it for
  143.      the settings that you want to use.  It is a good idea to see if you
  144.      can use the card through DOS before trying to use it through Linux.
  145.      If it works in DOS, chances are, it will work in Linux with the
  146.      same settings. If you have a Plug and Play adapter, if possible,
  147.      lock the settings once you get them where they work.
  148.  
  149.   2. Make a backup of your linux directory.  This is very important in
  150.      case you need to totally remove the source of the patch from your
  151.      kernel and go back to your original code.
  152.  
  153.        cd /usr/src
  154.        tar cvzhf linuxbak.tar.gz linux
  155.  
  156.   3. Uncompress the TokenRing patch.
  157.  
  158.        cd /usr/src/patches/token
  159.        gzip -d TokenRing.patch-1.2.0.gz
  160.  
  161.   4. Modify your kernel with the TokenRing patch.
  162.  
  163.        cd /usr/src/linux
  164.        patch -p1 < /usr/src/patches/token/TokenRing.patch-1.2.0
  165.  
  166.   -or-
  167.  
  168.        patch -p1 < <directory-of-patchfile>/TokenRing.patch-1.2.0
  169.  
  170.   5. Search your kernel for any rejects from the patch and make changes
  171.      as necessary.
  172.  
  173.        find . -name \*.rej -print
  174.  
  175.   6. Search your kernel for the orig files and remove them.
  176.  
  177.        find . -name \*.orig -print | xargs rm
  178.  
  179.   7. Configure your kernel and remake.
  180.  
  181.      NOTE:
  182.         Make sure your swap space is active if you have one.
  183.  
  184.        cd /usr/src/linux
  185.        make config
  186.  
  187.   (The patch should have added two lines to your config.in file for the
  188.   following options)
  189.  
  190.        Token Ring support (CONFIG_TR) [y]
  191.  
  192.   (and further down the list...)
  193.        IBM Tropic chipset based adaptor support (CONFIG_IBMTR) [y]
  194.  
  195.        make dep
  196.        make clean
  197.        make zImage
  198.  
  199.   8. Setup LILO.
  200.  
  201.      First rename your /vmlinuz kernel to vmlinuz.old then copy the
  202.      kernel to /vmlinuz.  On my system this would consist of copying
  203.  
  204.        /usr/src/linux/arch/i386/boot/zImage to /vmlinuz and editing
  205.        /etc/lilo.conf to boot that kernel.
  206.  
  207.   Now from the prompt run ``lilo''.
  208.  
  209.   9. You should now be able to reboot your system and use the Token Ring
  210.      card in your computer.  Please check the distribution specifc
  211.      section for any extra configuration information.
  212.  
  213.   5.  NetTools installation
  214.  
  215.   The NetTools package contains a lot of the basic utils that you will
  216.   use to communicate with network devices.  This includes programs like
  217.   arp, rarp, route, ifconfig and netstat.  Since these programs do not
  218.   know about Token Ring by default, you will need to add the NetTools
  219.   patch so these utilities can work more efficiently with the Token Ring
  220.   driver.
  221.  
  222.      NOTICE:
  223.         The current version of NetTools for 1.2.x kernels is 1.2.0.  If
  224.         you are running a 2.0 kernel, your nettools is most likely
  225.         already up to date.  However, you can get the latest source
  226.         from:
  227.  
  228.           <ftp://tapac.inka.de/pub/comp/Linux/networking/NetTools/>
  229.  
  230.   1. (1) Copy and Untar the NetTools source into your source directory.
  231.  
  232.        cp net-tools-1.2.0.patched.tar.gz  /usr/src
  233.        tar -zxvof /usr/src/net-tools-1.2.0.tar.gz
  234.  
  235.   2. (5) Make the net-tools files.
  236.  
  237.   cd /usr/src/net
  238.   make install
  239.  
  240.   6.  Known problems
  241.  
  242.   I personally have had very few problems with this driver.  It has been
  243.   working perfectly for me for quite some time.
  244.  
  245.   If you have any problems with the driver on a 1.2.x kernel, please
  246.   update to Linux 2.0.  The current version, as of this writing, is
  247.   2.0.33.  There have been many improvements to the token ring driver
  248.   since the 1.2 patches and most of them have not been ported back.
  249.  
  250.   Also, you will not have to patch a Linux 2.0 kernel for token ring.
  251.   The source is already included.  However, there are some test patches
  252.   of the code going into 2.1 available if you would like to use it.
  253.  
  254.   7.  Questions and comments
  255.  
  256.      Q: Can the token ring driver be compiled as a module?
  257.  
  258.      A: Yes, it can be --- and it works rather well.  There is an extra
  259.         parameter that you can use when it is compiled as a module.  If
  260.         you ever need to ``spoof'' software install programs, such as
  261.         the redhat boot disks, into configuring your token ring card as
  262.         an ethernet device (for NFS/FTP installs, etc), you can use the
  263.         ``device'' parameter to force a device name other then tr0.  You
  264.         will probably have problems if you try this with multiple
  265.         adapters.  It is mostly there to get around a few
  266.         incompatabiliites. Ex.:
  267.  
  268.           /sbin/insmod ibmtr device=eth0
  269.  
  270.      Q: I keep getting an error code ``0011''.  Whats up?
  271.  
  272.      A: Make sure that your connection to the network is good or that
  273.         you have a loopback connector on your token ring card.  This
  274.         message just means that it could not open the ring.  99.99% of
  275.         the times, it is just not plugged into one.
  276.  
  277.      C: If you have a sound card in your machine, and it sits at IO
  278.         0x220, you may end up with a conflict with your token ring
  279.         adapter at 0xa20.  If you notice that a supported adapter does
  280.         not seem to be working and you have a sound card, please try to
  281.         either set your token ring card to 0xa24 or move/remove your
  282.         sound card.
  283.  
  284.         Also...
  285.  
  286.         Here are some email messages that I have received about Token
  287.         Ring and Linux.  In some of the messages, I have removed parts
  288.         that were not important to save space.
  289.  
  290.         Q:
  291.  
  292.              From: "Mr. Chuck Rickard" <chuck@gl.umbc.edu>
  293.              Subject: Re: Token Ring Kernel patch
  294.  
  295.              I d/l'd the patch, applied it, and re-compiled. When booting it said,
  296.              "tr0: Can't assign device to adapter" and again for tr1.  Any ideas?
  297.  
  298.              Thanks!
  299.  
  300.              Chuck Rickard
  301.              (chuck@umbc8.umbc.edu)
  302.  
  303.         A:
  304.  
  305.              From: David Morris <dwm@shell.portal.com>
  306.  
  307.         When this is the only message issued, it means that the PIO
  308.         request for adapter information (see segment = inb(PIOaddr) in
  309.         ibmtr.c) was so out of range that there is no TR card at that IO
  310.         address.
  311.  
  312.         Q:
  313.  
  314.              From: Mike Glover <glover@credit.erin.utoronto.ca>
  315.              Subject: Token ring problems.
  316.  
  317.              Thanks for responding. I was starting to thing that I posted incorrectly,
  318.              and I was about to post again. Anyway, the following  clip is part of my
  319.              /var/adm/messages file from when I boot up.
  320.  
  321.              May  2 10:03:14 linux kernel: tr0: Unable to assign adapter to device.
  322.              May  2 10:03:14 linux kernel: tr1: Unable to assign adapter to device.
  323.  
  324.              The section, tr0: Unable to assign adapter device. is what kinda confuses
  325.              me. The documentation is slim at best so I didn't know what to do with
  326.              the message. I know I didn't assign any token ring information,
  327.              and I didn't know where to do it.
  328.  
  329.              The hardware:
  330.                          Its a PC clone (Dell OMNIPLEX 560 to be exact)
  331.                          The token ring card is a Olicom 16/4 Adapter.
  332.  
  333.              I have DOS token ring drivers and it snaps into the network, so there is
  334.              nothing wrong with the card. I think, I am just missing something really
  335.              small in the config on the Linux side.
  336.  
  337.         A: The Olicom 16/4 Adapter does not use the Tropic Chipset.  Try
  338.            using one of the cards that are listed at the top of the
  339.            HOWTO.
  340.  
  341.         Q:
  342.  
  343.              From: Mike Glover <glover@credit.erin.utoronto.ca>
  344.              Subject: Found an IBM card...
  345.  
  346.              I found myself an IBM token ring card and I got a little further,
  347.              but still not luck. (I did change /etc/rc.d/rc.inet1 ifconfig entry
  348.              from eth0 to tr0)
  349.  
  350.              Anyway, here is part of the /var/adm/messages file:
  351.              May  2 16:23:07 linux kernel: IPX Portions Copyright (c) 1995 Caldera, Inc.
  352.              May  2 16:23:07 linux kernel: tr0: PIOaddr:  a20 seg/intr: b8 mmio base:
  353.                 000dc000 intr: 0
  354.              May  2 16:23:07 linux kernel: tr0: Channel ID string not found for PIOaddr: a20
  355.              May  2 16:23:07 linux kernel: tr0: Expected for ISA: 5049434f3631313039393020
  356.              May  2 16:23:07 linux kernel: tr0:            found: 000902003021111000182000
  357.              May  2 16:23:07 linux kernel: tr0: Expected for MCA: 4d4152533633583435313820
  358.              May  2 16:23:07 linux kernel: tr0: Unable to assign adapter to device.
  359.              May  2 16:23:07 linux kernel: tr1: Unable to assign adapter to device.
  360.              May  2 16:23:07 linux kernel: PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS
  361.                 OPTIMIZE_FLAGS
  362.  
  363.              Does this tell you anything. It tells me little.
  364.  
  365.         A:
  366.  
  367.              From: David Morris <dwm@shell.portal.com>
  368.  
  369.         This message means either a memory conflict with the MMIO area
  370.         or a TR card which is not compatible with the driver (at least
  371.         the signature isn't known).
  372.  
  373.         Q:
  374.  
  375.         From: Mike Glover <glover@credit.erin.utoronto.ca>
  376.         Subject: Almost there...
  377.  
  378.         The following sample is what I'm getting on my messages file:
  379.  
  380.         May  3 14:50:24 linux kernel: tr0: now opening the board...
  381.         May  3 14:50:24 linux kernel: tr0: board opened...
  382.         May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
  383.            Donald resets adapter, but resetting
  384.         May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time.
  385.            It might not even help when the
  386.         May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little longer
  387.            and hope for the best.
  388.         May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
  389.            Donald resets adapter, but resetting
  390.         May  3 15:11:47 linux kernel:  the IBM tokenring adapter takes a long time.
  391.            It might not even help when the
  392.         May  3 15:11:47 linux kernel:  ring is very busy, so we just wait a little longer
  393.            and hope for the best.
  394.         May  3 15:11:47 linux kernel: tr0: Arrg. Transmitter busy for more than 50 msec.
  395.            Donald resets adapter, but resetting
  396.  
  397.         The Arrg entry only comes when I telnet, rlogin or ftp to a remote
  398.         machine. Once that happens, the connection hangs big time. I took out all
  399.         the other hardware (which was 1 SCSI card) and tried running the card all
  400.         by itself. Same thing, so it eliminates hardware IRQ's from getting into
  401.         a yelling match. The following are the DIP switches on the card:
  402.  
  403.         1       Up      |
  404.         2       Down    |
  405.         3       Down    |       According to the manual this sets the
  406.         4       Up      |       base address to CC000 Which is fine for
  407.         5       Up      |       my machine.
  408.         6       Down    |
  409.         7       Down    +       This sets the IRQ to 2. Which is also fine
  410.         8       Down    +
  411.         9       Up      X       Primary Lan adapter. Which it is.
  412.         10      Up      =       16 KB shared RAM size. This OK?
  413.         11      Down    =
  414.         12      Up      #       16 Mbps Data rate.
  415.  
  416.         I was wondering if it is in fact the dip switches, or the way I have
  417.         configured my route table and other network info.
  418.  
  419.         ttfn,
  420.         Mike
  421.  
  422.         A: The Arrg problem is pretty much taken care of in the 2.0
  423.            kernels.  All of the patches have not been ported back to
  424.            1.2, and I doubt that they will be.  If you get excessive
  425.            Arrg messages, do yourself a favour and move to Linux 2.0.
  426.  
  427.   8.  Distribution Specific Installations
  428.  
  429.   8.1.  Slackware 96
  430.  
  431.   If you have not already ran ``netconfig'' on your system, do so now.
  432.   Setup your machine just as if it were on Ethernet.
  433.  
  434.   Edit your /etc/rc.d/rc.inet1 scripts to point to the tr0 device rather
  435.   than the eth0 device.
  436.   You should have a line that looks like
  437.  
  438.        /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
  439.  
  440.   Change this line to read
  441.  
  442.        /sbin/ifconfig tr0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
  443.  
  444.   8.2.  RedHat 4.0+
  445.  
  446.   The RedHat distribution of Linux has a wonderful Xwindows control
  447.   panel for configuring modules and devices. If you have added a token
  448.   ring adapter to a standard RedHat installation, there should already
  449.   be token ring support compiled in as a module.  Try to:
  450.  
  451.        modprobe ibmtr
  452.  
  453.   and see what you come up with.  Chances are, if you have a supported
  454.   adapter, you will be ready to go.
  455.  
  456.   The easiest way to configure your interface would be to use the
  457.   control-panel.  You will first want to go to the kernel module control
  458.   and instruct it to load a new network device for token ring.  It
  459.   should then start to autoload the ibmtr driver on boot.  You will then
  460.   want to jump over to network configuration and add a new device, tr,
  461.   and give it an ip address, etc.
  462.  
  463.   You should then be able to restart and go with Linux and Token Ring on
  464.   RedHat 4.0+.
  465.  
  466.   Please note that these RedHat instructions came from the top of my
  467.   head.  I havn't had to modify any of my RedHat systems for quite some
  468.   time and am writing this from memory.  Either way, they should be able
  469.   to get you where you need to go.
  470.  
  471.